package by.ins.life.impl;


import by.ins.life.INuclear;
import by.ins.life.ISet;
import by.yativem.commons.utils.matrix.IMatrix;
import by.yativem.commons.utils.matrix.Matrix;

public class Set<NuclearType> implements ISet<NuclearType> {

	private static final long serialVersionUID = 1L;

	protected long evolutionCount;

	protected IMatrix<INuclear<NuclearType>> matrix;

	public Set(int rows, int columns) {
		evolutionCount = 0;
		 matrix = new Matrix< INuclear<NuclearType> >(rows, columns);
	}

	public Set() {

	}

	@Override
	public IMatrix<INuclear<NuclearType>> getMatrix() {
		return matrix;
	}

	@SuppressWarnings("unchecked")
	@Override
	public Object clone() {
		Set<NuclearType> clone = new Set<NuclearType>();
		clone.evolutionCount = this.evolutionCount;
		clone.matrix = (IMatrix<INuclear<NuclearType>>) this.matrix.clone();
		return clone;
	}

	@Override
	public void setMatrix(IMatrix<INuclear<NuclearType>> matrix) {
		this.matrix = (IMatrix<INuclear<NuclearType>>) matrix;

	}

	@Override
	public Set<NuclearType> getImmutable() {
		throw new UnsupportedOperationException();
		// return null;
	}
}
